package com.lc.luzhengtang.fragment;

import android.app.ProgressDialog;
import android.view.Window;

import com.zcx.helper.fragment.AppV4Fragment;

/**
 * Created by Administrator on 2017/5/2.
 */

public class BaseFragment extends AppV4Fragment {


    private ISlideCallback mISlideCallback;

    public BaseFragment() {

    }
    private ProgressDialog dialog;

    public void showLoading() {
        if (dialog != null && dialog.isShowing()) return;
        dialog = new ProgressDialog(getActivity());
        dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
        dialog.setCanceledOnTouchOutside(false);
        dialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);
        dialog.setMessage("请求网络中...");
        dialog.show();
    }

    public void dismissLoading() {
        if (dialog != null && dialog.isShowing()) {
            dialog.dismiss();
        }
    }


}
